package Servlets;

import Dao.EmployerDaoimpl;
import Dao.SeekerDaoimpl;
import Entity.Employer;
import Entity.Seeker;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/seinformation")

public class Seinformation extends HttpServlet {

    private static final long serialVersionUID = 1L;


    public Seinformation() {

        super();
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

// TODO Auto-generated method stub

        request.setCharacterEncoding("UTF-8");

        response.setCharacterEncoding("UTF-8");

        response.setContentType("text/html;charset=UTF-8");

        int sid = Integer.parseInt(request.getParameter("sid"));
        SeekerDaoimpl se = new SeekerDaoimpl();


        try {
            Seeker ec = se.SearchById(sid);
            request.setAttribute("myinfm", ec);

            request.getRequestDispatcher("seinformation.jsp").forward(request, response);
        } catch (Exception e) {

// TODO Auto-generated catch block

            e.printStackTrace();

        }


    }


    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

// TODO Auto-generated method stub

        doGet(request, response);

    }


}
